package com.zjtiobaco.order;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.zjtobacco.domain.Goods;

public class InStoreOrder {
	private String orderId;
	private String orderDate;
	private List<Goods> goodsList = new ArrayList<Goods>();
	private List<Integer> amountList = new ArrayList<Integer>();
	private String platform;
	private String carNumber;

	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("Order Id:").append(orderId).append(",");
		sb.append("Order Date:").append(orderDate).append(",");
		sb.append("goodsList:[");
		for (int index = 0; index < goodsList.size(); index++) {
			Goods goods = goodsList.get(index);
			sb.append(goods.getName()).append(":").append(goods.getType())
					.append(":").append(amountList.get(index)).append("|");
		}
		sb.append("],");
		sb.append("Platform:").append(platform).append(",");
		sb.append("Car:").append(carNumber);

		return sb.toString();
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}

	public List<Goods> getGoodsList() {
		return goodsList;
	}

	public void setGoodsList(List<Goods> goodsList) {
		this.goodsList = goodsList;
	}

	public List<Integer> getAmountList() {
		return amountList;
	}

	public void setAmountList(List<Integer> amountList) {
		this.amountList = amountList;
	}

	public String getPlatform() {
		return platform;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}

	public String getCarNumber() {
		return carNumber;
	}

	public void setCarNumber(String carNumber) {
		this.carNumber = carNumber;
	}
}
